home *** CD-ROM | disk | FTP | other *** search
- ; Installation-Script for ScreenTab V3.1
- ; Author: Michael Link
- ; First creation : 28.10.94
- ; Last change : 24.03.97
-
- ; @s English string section
-
- (set #bad-version
- (cat "\n\nSorry, but ScreenTab requires\n"
- "at least Kickstart 2.04"
- )
- )
-
- (set #help-dir
- (cat "You must enter the name of the directory, in which\n"
- "ScreenTab shall be installed.\n\n"
- "If you want ScreenTab to be active everytime you\n"
- "start the computer, enter the directory\n"
- "\"SYS:WBStartup\", which is the default directory."
- )
- )
-
- (set #dir-request
- (cat "Please enter the destination directory\n"
- "for ScreenTab"
- )
- )
-
- (set #prefs-dir-request
- (cat "Please enter the destination directory\n"
- "for the ScreenTab-Preferences"
- )
- )
-
- (set #which-scrkey
- (cat "\n\nWith which key combination shall the\n"
- "screens be switched ?\n\n"
- "(Don't use any of the SHIFT-Keys, because\n"
- "ScreenTab needs them for back-switching !)"
- )
- )
-
- (set #which-winkey
- (cat "\n\nWith which key combination shall the\n"
- "windows be switched ?\n\n"
- "(Don't use any of the SHIFT-Keys, because\n"
- "ScreenTab needs them for back-switching !)"
- )
- )
-
- (set #msg-imagedir
- (cat "\n\nThe destination directory already contains\n"
- "a ScreenTab executable which will be updated.\n"
- "All icon settings will be preserved, but you\n"
- "should create a new tool-type IMAGEDIR after\n"
- "the installation which points to the directory\n"
- "containing your images."
- )
- )
-
- (set #write-tooltypes
- "\nWriting Tool-Types ..."
- )
-
- (set #old-prefs-file
- (cat "\n\nThere's an older preferences file installed\n"
- "on your system. If you want to use these\n"
- "preferences, they must be converted.\n\n"
- "Do you want to do this ?"
- )
- )
-
- (set #ask-plugins "\nWhich PlugIn-Modules do you want to install ?\n")
-
- (set #ask-plugins-help
- (cat "PlugIn-Modules add new functionality to the Start-Button."
- "They can i. e. control commodities, eject changeable media "
- "or close windows.\n\n"
- "Please read the documentation for details."
- )
- )
-
- (set #ask-plugin-dir "\nChoose a directory for the modules ...\n")
-
- (set #ask-brushes
- (cat "\n\nDo you want to install the\n"
- "included image-files (MWB-Style) ?"
- )
- )
-
- (set #ask-brushes-dir
- (cat "In which directory shall I create\n"
- "the ScreenTab-Images-Directory ?"
- )
- )
-
- (set #extracting-brushes "Extracting image files ...")
-
- (set #ask-brushes-message
- (cat "\n\n\nH I N T"
- "\n\nThe easiest way to chose an image for an\n"
- "application or a startup node is to drag the icon\n"
- "of the image onto the image path gadget !"
- )
- )
-
- (set #ask-catalogs
- "\nWhich language catalogs shall be installed ?\n"
- )
-
- (set #ask-scrnotify
- (cat "\n\nIf available, ScreenTab uses\n"
- "the ScreenNotify-Library to react on changes\n"
- "of the Workbench resolution.\n\n"
- "Do you want to install this library ?"
- )
- )
-
- (set #ask-scrnotify-help
- (cat "The usage of this library is optional. "
- "But if the Workbench resolution is changed "
- "without this library installed, it can "
- "cause system instability or crashes.\n\n"
- "If you don't want to use an installed "
- "ScreenNotify-Library, set the tool-type "
- "USESCREENNOTIFY to NO."
- )
- )
-
- (set #ask-wbstarth
- (cat "\n\nScreenTab uses the WBStart-Handler by\n"
- "Stefan Becker to emulate a program start\n"
- "via Workbench.\n\n"
- "Do you want to install the handler now ?"
- )
- )
-
- (set #ask-wbstartl
- (cat "\n\nScreenTab uses the WBStart-Library by\n"
- "Stefan Becker to emulate a program start\n"
- "via Workbench.\n\n"
- "Do you want to install the library now ?"
- )
- )
-
- (set #copy-screentab
- "\n\nCopying ScreenTab ..."
- )
-
- (set #copy-screentabprefs
- "\n\nCopying ScreenTabPrefs ..."
- )
-
- (set #copy-plugin
- "\n\nCopying PlugIn-Module ..."
- )
-
- (set #copy-brushes
- "\n\nCopying Image-Files ..."
- )
-
- (set #copy-scrnotify
- "\n\nCopying ScreenNotify-Library ..."
- )
-
- (set #copy-wbstarth
- "\n\nCopying WBStart-Handler ..."
- )
-
- (set #copy-wbstartl
- "\n\nCopying WBStart-Libraries ..."
- )
-
- (set #copy-catalogs
- "\n\nCopying language catalogs ..."
- )
-
- (set #catalog-choice-default 0)
-
- (set #lang-german "Deutsch" )
- (set #lang-italian "Italiano" )
- (set #lang-french "Français" )
-
- (set #error-conversion
- "\n\nError during conversion !!!"
- )
-
- (set #error-prefs
- (cat "\n\nAn error occured during checking of the version\n"
- "of the preferences file. Probably this happened\n"
- "because you are using a file of the first ScreenTab\n"
- "version (1.13).\n\n"
- "This version isn't supported anymore !"
- )
- )
- ; @e
-
- ; @s German string section
-
- (if (= @language "deutsch")
- (
-
- (set #bad-version
- (cat "\n\nSorry, aber ScreenTab läuft erst ab\n"
- "Kickstart 2.04."
- )
- )
-
- (set #help-dir
- (cat "An dieser Stelle müssen Sie angeben, in welchem\n"
- "Verzeichnis ScreenTab installiert werden soll.\n\n"
- "Wenn ScreenTab gleich nach dem Start des Computers\n"
- "aktiv sein soll, sollten Sie als Zielverzeichnis\n"
- "\"SYS:WBStartup\" angeben."
- )
- )
-
- (set #dir-request
- (cat "Geben Sie jetzt das Verzeichnis an,\n"
- "in dem ScreenTab installiert werden soll."
- )
- )
-
- (set #prefs-dir-request
- (cat "Geben Sie jetzt das Verzeichnis an, in das das\n"
- "Voreinstellungsprogramm kopiert werden soll."
- )
- )
-
- (set #which-scrkey
- (cat "\n\nMit welcher Tastenkombination sollen die\n"
- "Screens umgeschaltet werden ?\n\n"
- "(Bitte geben Sie hier keine SHIFT-Taste an, da\n"
- "diese für das Zurückblättern gebraucht werden !)"
- )
- )
-
- (set #which-winkey
- (cat "\n\nMit welcher Tastenkombination sollen die\n"
- "Fenster umgeschaltet werden ?\n\n"
- "(Bitte geben Sie hier keine SHIFT-Taste an, da\n"
- "diese für das Zurückblättern gebraucht werden !)"
- )
- )
-
- (set #msg-imagedir
- (cat "\n\nDas Zielverzeichnis enthält bereits eine\n"
- "ScreenTab-Version, die hiermit ersetzt wird.\n"
- "Alle Einstellungen werden erhalten, allerdings\n"
- "sollten Sie einen neuen Tool-Type IMAGEDIR anlegen,\n"
- "der auf das Verzeichnis zeigt, das die Images enthält."
- )
- )
-
- (set #write-tooltypes
- "\nSchreibe Tool-Types ..."
- )
-
- (set #old-prefs-file
- (cat "\n\nEine ältere Voreinstellungsdatei ist auf\n"
- "ihrem System installiert. Um diese Einstellungen\n"
- "mit der neuen Version nutzen zu können, muß\n"
- "eine Konvertierung vorgenommen werden.\n\n"
- "Wollen Sie das ?"
- )
- )
-
- (set #ask-plugins "\nWelche PlugIn-Module wollen Sie installieren ?\n")
-
- (set #ask-plugins-help
- (cat "PlugIn-Module erweitern die Funktionalität des "
- "Start-Buttons. Mit ihnen können beispielsweise "
- "die Commodities kontrolliert, Wechselmedien "
- "ausgeworfen oder Fenster geschlossen werden.\n\n"
- "Bitte lesen Sie dazu die Dokumentation."
- )
- )
-
- (set #ask-plugin-dir
- "\nBitte wählen Sie ein Verzeichnis für die PlugIn-Module ...\n"
- )
-
- (set #ask-brushes
- (cat "\n\nWollen Sie die mitgelieferten Image-Dateien\n"
- "installieren (MWB-Stil) ?"
- )
- )
-
- (set #ask-brushes-dir
- (cat "In welches Verzeichnis sollen die Image-Dateien\n"
- "kopiert werden ? Ein Verzeichnis mit dem Namen\n"
- "'ScreenTab-Images' wird dort angelegt"
- )
- )
-
- (set #extracting-brushes "Entpacke Image-Dateien ...")
-
- (set #ask-brushes-message
- (cat "\n\n\nH I N W E I S"
- "\n\nAm einfachsten ordnen Sie einer Anwendung\n"
- "oder einem Startup-Eintrag ein Image zu, indem\n"
- "Sie das Icon des Image auf das Eingabefeld für\n"
- "den Image-Pfad ziehen."
- )
- )
-
- (set #ask-catalogs
- "\nWelche Sprach-Kataloge sollen installiert werden ?\n"
- )
-
- (set #ask-scrnotify
- (cat "\n\nScreenTab benutzt, falls vorhanden,\n"
- "die ScreenNotify-Library, um auf Wechsel der\n"
- "Workbench-Auflösung reagieren zu können.\n\n"
- "Wollen Sie diese Library installieren ?"
- )
- )
-
- (set #ask-scrnotify-help
- (cat "Die Benutzung dieser Library ist optional. "
- "Allerdings kann es zu Fehlern oder Abstürzen "
- "kommen, wenn die Workbench-Auflösung ohne "
- "installierte Library gewechselt wird.\n\n"
- "Wenn Sie auf die ScreenNotify-Library "
- "verzichten wollen, können Sie dies gezielt "
- "mit dem Tool-Type USESCREENNOTIFY unterbinden, "
- "indem Sie ihn auf NO setzen."
- )
- )
-
- (set #ask-wbstarth
- (cat "\n\nScreenTab braucht den WBStart-Handler von\n"
- "Stefan Becker, um einen Programmstart über die\n "
- "Workbench zu emulieren.\n\n"
- "Wollen Sie den Handler jetzt installieren ?"
- )
- )
-
- (set #ask-wbstartl
- (cat "\n\nScreenTab braucht die WBStart-Library von\n"
- "Stefan Becker, um einen Programmstart über die\n"
- "Workbench zu emulieren.\n\n"
- "Wollen Sie die Library jetzt installieren ?\n"
- )
- )
-
- (set #copy-screentab
- "\n\nKopiere ScreenTab ..."
- )
-
- (set #copy-screentabprefs
- "\n\nKopiere ScreenTabPrefs ..."
- )
-
- (set #copy-plugin
- "\n\nKopiere PlugIn-Module ..."
- )
-
- (set #copy-brushes
- "\n\nKopiere Image-Dateien ..."
- )
-
- (set #copy-scrnotify
- "\n\nKopiere ScreenNotify-Library ..."
- )
-
- (set #copy-wbstarth
- "\n\nKopiere WBStart-Handler ..."
- )
-
- (set #copy-wbstartl
- "\n\nKopiere WBStart-Libraries ..."
- )
-
- (set #copy-catalogs
- "\n\nKopiere Sprachkataloge ..."
- )
-
- (set #catalog-choice-default 1)
-
- (set #error-conversion
- "\n\nFehler beim Konvertieren !!!"
- )
-
- (set #error-prefs
- (cat "\n\nBeim der Versions-Überprüfung der Voreinstellungs-\n"
- "datei trat ein Fehler auf. Wahrscheinlich benutzen\n"
- "Sie noch eine Datei der ersten ScreenTab-Version (1.13).\n\n"
- "Diese wird jedoch nicht mehr unterstützt !"
- )
- )
-
- )
- ) ; endif
-
- ; @e
-
- ; @s Different version numbers
-
- (set intuition_vernum (getversion "intuition.library" (resident)))
- (set intuition_ver (shiftright intuition_vernum 16))
- (set locale_vernum (getversion "locale.library" (resident)))
- (set locale_ver (shiftright locale_vernum 16))
- (set scrntfy_vernum (getversion "LIBS:screennotify.library"))
- (set scrntfy_ver (shiftright scrntfy_vernum 16))
- (set wbstarth_vernum (getversion "L:WBStart-Handler"))
- (set wbstarth_ver (shiftright wbstarth_vernum 16))
- (set wbstartl_vernum (getversion "LIBS:wbstart.library"))
- (set wbstartl_ver (shiftright wbstartl_vernum 16))
-
- ; @e
-
- ; @s check OS version and CPU
- (if (< intuition_ver 37)
- (abort #bad-version)
- )
-
- (set #cpu020 (not (patmatch "68000|68010" (database "cpu"))))
- ; @e
-
- ; @s Ask for destination directory
-
- (set DIR (askdir (prompt #dir-request)
- (help #help-dir)
- (default "SYS:WBStartup")
- )
- )
-
- (set PREFSDIR (askdir (prompt #prefs-dir-request)
- (help @askdir-help)
- (default "SYS:Prefs")
- )
- )
-
- (if (askbool (prompt #ask-brushes)
- (help)
- (default 1)
- )
- (
- (set #extract-images 1)
-
- (set #brush-dir (askdir (prompt #ask-brushes-dir)
- (help @askdir-help)
- (default "SYS:Prefs")
- )
- )
-
- (set #brush-dir (tackon #brush-dir "ScreenTab-Images"))
- )
- )
-
- ; @e
-
- ; @s Tool-Types and copy main program
-
- (set @default-dest DIR)
-
- (set #oldversion-exists (exists (tackon DIR "ScreenTab") (noreq) ) )
-
- ; we must check if an old version is still in this directory
- (if (= #oldversion-exists 0)
- (
- (set SWITCHKEY (askstring (prompt #which-scrkey)
- (help @askstring-help)
- (default "LCommand Tab")
- )
- )
-
- (set WINSWITCHKEY (askstring (prompt #which-winkey)
- (help @askstring-help)
- (default "LCommand `")
- )
- )
-
- (tooltype (prompt #write-tooltypes)
- (help)
- (if (= #cpu020 0) (dest "ScreenTab") (dest "ScreenTab.020"))
- (settooltype "SWITCHKEY" SWITCHKEY)
- (settooltype "WINSWITCHKEY" WINSWITCHKEY)
- (if (= #extract-images 1) (settooltype "IMAGEDIR" #brush-dir) )
- )
- )
- (
- (message #msg-imagedir)
- )
- )
-
- (copyfiles (prompt #copy-screentab)
- (help @copyfiles-help)
- (if (= #cpu020 0) (source "ScreenTab") (source "ScreenTab.020"))
- (newname "ScreenTab")
- (dest DIR)
- (if (= #oldversion-exists 0) (infos) )
- )
-
- (set @default-dest PREFSDIR)
-
- (copyfiles (prompt #copy-screentabprefs)
- (help @copyfiles-help)
- (source "Prefs/ScreenTabPrefs")
- (dest PREFSDIR)
- (infos)
- )
-
- ; @e
-
- ; @s Checking for preferences file and need for conversion
-
- (if (exists "ENVARC:ScreenTab.prefs")
- (
- (set #check-prefsversion (run "HandleScrTab PREFSVERSION" (safe) ) )
-
- (if (> #check-prefsversion 1)
- (message #error-prefs)
- )
-
- (if (= #check-prefsversion 1)
- (if (askbool (prompt #old-prefs-file)
- (help)
- (default 1)
- )
- (if (> (run "HandleScrTab CONVERTPREFS" (safe) ) 0)
- (copyfiles (prompt)
- (help)
- (source "T:SCRT.TMP")
- (dest "ENVARC:")
- (newname "ScreenTab.prefs")
- )
- (message #error-conversion)
- )
- )
- )
- )
- (copyfiles (prompt #copy-preferences)
- (help)
- (source "ScreenTab.prefs")
- (dest "ENVARC:")
- )
- )
-
- ; @e
-
- ; @s Installation of the PlugIn-Modules
-
- (set #plugin-choice (askoptions (prompt #ask-plugins)
- (help #ask-plugins-help)
- (choices "Commodities"
- "Windows"
- "SysTools"
- "PasteClip")
- )
- )
-
- (if #plugin-choice
- (
- (set #plugin-dir (askdir (prompt #ask-plugin-dir)
- (help @askfile-help)
- (default "LIBS:plugins")
- )
- )
-
- (set n 0)
-
- (while (set #plugin (select n "commodities.plugin"
- "windows.plugin"
- "systools.plugin"
- "pasteclip.plugin"
- ""
- )
- )
- (if (IN #plugin-choice n)
- (
- (set #plugin-source (tackon "PlugIns" #plugin))
-
- (copylib (prompt #copy-plugin)
- (help)
- (source #plugin-source)
- (dest #plugin-dir)
- )
- )
- )
-
- (set n (+ n 1))
- )
- )
- )
-
- ; @e
-
- ; @s Extracting of the images
- (if (= #extract-images 1)
- (
- (makedir #brush-dir
- (prompt)
- (help @makedir-help)
- (infos)
- )
-
- (set #exelha (cat "lha e Images.lha \""
- #brush-dir "/\""
- )
- )
-
- (working #extracting-brushes)
-
- (run #exelha)
-
- (message #ask-brushes-message (all) )
- )
- )
-
- ; @e
-
- ; @s Installation of the ScreenNotify-Library
-
- (if (= scrntfy_ver 0)
- (if (askbool (prompt #ask-scrnotify)
- (help #ask-scrnotify-help)
- (default 1)
- )
- (copylib (prompt #copy-scrnotify)
- (help)
- (source "Libs/screennotify.library")
- (dest "LIBS:")
- (confirm)
- )
- )
- )
-
- ; @e
-
- ; @s Installation of the WBStart-Library or -Handler
-
- ; we can only use WBStart-Library with OS 3.x
- (if (>= intuition_ver 39)
- (if (= wbstartl_ver 0)
- (if (askbool (prompt #ask-wbstartl)
- (help)
- (default 1)
- )
- (
- (copylib (prompt #copy-wbstartl)
- (help)
- (source "Libs/wbstart.library")
- (dest "LIBS:")
- (confirm)
- )
- (copylib (prompt #copy-wbstartl)
- (help)
- (source "Libs/dospath.library")
- (dest "LIBS:")
- (confirm)
- )
- )
- )
- )
- (if (= wbstarth_ver 0)
- (if (askbool (prompt #ask-wbstarth)
- (help)
- (default 1)
- )
- (copylib (prompt #copy-wbstarth)
- (help)
- (source "L/WBStart-Handler")
- (dest "L:")
- (confirm)
- )
- )
- )
- )
-
- ; @e
-
- ; @s Installation of the catalogs
-
- (if (>= locale_ver 38)
- (
- (set #catalogs (askoptions (prompt #ask-catalogs)
- (help)
- (choices #lang-german #lang-french)
- (default #catalog-choice-default)
- )
- )
-
- (if (> #catalogs 0)
- (
- (set n 0)
-
- (while (set #language (select n "deutsch" "français" ""))
-
- (if (IN #catalogs n)
- (
- (set #dstpath (tackon (tackon "LOCALE:Catalogs" #language) "ScreenTab"))
-
- (if (NOT (exists #dstpath))
- (makedir #dstpath
- (prompt)
- (help @makedir-help)
- )
- )
-
- (set #srcpath (cat "catalogs/"
- #language
- )
- )
-
- (copyfiles (prompt #copy-catalogs)
- (help)
- (source #srcpath)
- (dest #dstpath)
- (pattern "#?.catalog")
- )
-
- (if #plugin-choice
- (
- (set #dstpath-plugins (tackon #dstpath "PlugIns"))
-
- (if (NOT (exists #dstpath-plugins))
- (makedir #dstpath-plugins
- (prompt)
- (help @makedir-help)
- )
- )
-
- (set #srcpath-plugins (tackon #srcpath "PlugIns"))
-
- (copyfiles (prompt #copy-catalogs)
- (help)
- (source #srcpath-plugins)
- (dest #dstpath-plugins)
- (pattern "#?.catalog")
- )
- )
- )
- )
- )
-
- (set n (+ n 1))
- )
- )
- )
- )
- )
-
- ; @e
-